package com.yxw.live_vod_facade.feign;

import com.yxw.live_vod_facade.dto.*;
import com.yxw.live_vod_facade.vo.OnDemandCommentVO;
import com.yxw.live_vod_facade.vo.PageVodInfoListVO;
import com.yxw.live_vod_facade.vo.VideoReviewVO;
import com.yxw.live_vod_facade.vo.VodSalesRevenueVo;
import com.yxw.yxnet_cd_center.common.dto.PageVO;
import com.yxw.yxnet_cd_center.common.helper.ResultHelper;
import com.yxw.yxnet_cd_center.common.utils.BaseResult;
import feign.Param;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "live-vod-boot", contextId = "onDemand")
public interface OnDemandFeignClient {

    /**
     * 点播点赞信息添加到数据库
     */
    @ApiOperation(value = "点播点赞信息从redis添加到数据库")
    @PostMapping(value = "/api/onDemand/like/addLikeRecord")
    public BaseResult addLikeRecord();


    @PostMapping(value = "/api/onDemand/review/handle")
    @ApiOperation(value = "视频审核处理")
    public BaseResult handle(@RequestBody @Validated VideoReviewHandelDTO dto);

    @ApiOperation(value = "查询待审核视频列表")
    @PostMapping(value = "/api/onDemand/review/pageVideoReviews")
    public BaseResult<PageVO<VideoReviewVO>> pageVideoReviews(@RequestBody PageVideoReviewsDTO dto);


    @ApiOperation(value = "店铺点播作品列表详情查询")
    @PostMapping(value = "/api/onDemand/video/pageVodInfoList")
    public BaseResult<PageVO<PageVodInfoListVO>> pageVodInfoList(@RequestBody PageVodInfoListDto dto);

    @ApiOperation(value = "查询视频下面的评论和回复")
    @PostMapping(value = "/api/onDemand/comment/pageVideoComments")
    public BaseResult<PageVO<OnDemandCommentVO>> pageVideoComments(@RequestBody PageOnDemandCommentDTO dto);

    @ApiOperation(value = "删除评论")
    @PostMapping(value = "/api/onDemand/comment/deleteCommentById")
    public BaseResult deleteCommentById(@RequestBody Long commentId);

    @PostMapping(value = "/api/onDemand/video/deleteVideoByIds")
    @ApiOperation(value = "下架视频")
    public BaseResult deleteVideoByIds(@Validated @RequestBody VideoDeleteDTO dto);

    @ApiOperation(value = "抽取热门数据和最新数据放入缓存(每天凌晨执行一次)")
    @PostMapping(value = "/api/onDemand/video/extractVodByDay")
    public BaseResult extractVodByDay();

    @ApiOperation(value = "查询点播上架商品和订单统计信息")
    @PostMapping(value = "/api/onDemand/video/getVodProductOrderByVideoId")
    public BaseResult<VodSalesRevenueVo> getVodProductOrderByVideoId(@RequestBody Long videoId);
}
